package edu.kit.csl.cratylus.extraction;

import edu.kit.csl.cratylus.datatypes.Word;

/**
 * This writing system converts a phoneme string into a written representation
 * by removing all blanks. This is the most trivial writing system 
 * implementation.
 */
public class DropBlankWritingSystem implements WritingSystem {

	/**
	 * Converts a blank separated phoneme string into the writing system's
	 * representation by removing all blanks.
	 * 
	 * @param word the word containing a blank separated phoneme string
	 * @return the content without any whitespace
	 */
	@Override
	public String convert(Word word) {
		return word.getContent().replaceAll("\\s", "");
	}
}
